//
// Created by root on 2/21/18.
//

#ifndef FUNNY_EDITOR_HIGHLIGHT_H
#define FUNNY_EDITOR_HIGHLIGHT_H

#include "lib.h"

typedef struct _HighlightBlock {
    gchar *text;
    gint start;
    gint end;
    gchar *fgColor;
    gchar *bgColor;
} HighlightBlock;

HighlightBlock** get_highlight_blocks(gchar *text);

void highlight(GtkTextBuffer *buffer, FunnyWindow *app);

void set_text_color(GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end, gchar *whichColor, gchar *color);
void set_foreground_color(GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end, gchar *color);
void set_background_color(GtkTextBuffer *buffer, GtkTextIter *start, GtkTextIter *end, gchar *color);

#endif //FUNNY_EDITOR_HIGHLIGHT_H
